

    \filetitle{redate}{Change time dimension of time series}{tseries/redate}

	\paragraph{Syntax}

\begin{verbatim}
X = redate(X,oldDate,newDate)
\end{verbatim}

\paragraph{Input arguments}

\begin{itemize}
\item
  \texttt{X} {[} tseries {]} - Input time series.
\item
  \texttt{OldDate} {[} numeric {]} - Base date that will be converted to
  a new date; \texttt{OldDate} does not need to be the stard date of
  \texttt{X} and does not even need to be within the current date range
  of \texttt{X}.
\item
  \texttt{NewDate} {[} numeric {]} - A new date to which the base date
  \texttt{oldDate} will be changed; \texttt{NewDate} need not be the
  same frequency as \texttt{OldDate}.
\end{itemize}

\paragraph{Output arguments}

\begin{itemize}
\tightlist
\item
  \texttt{X} {[} tseries {]} - Output tseries object with identical data
  as the input tseries object, but with its time dimension changed.
\end{itemize}

\paragraph{Description}

\paragraph{Example}

Create a time series on a date range from \texttt{2000Q1} to
\texttt{2000Q4}. Change the time dimension of the time series so that
\texttt{1999Q4} (which is a date outside the original time series range)
changes into \texttt{2009Q4} (which will again be a date outside the new
time series range).

\begin{verbatim}
>> x = tseries(qq(2000,1):qq(2000,4),1:4)
x =
    tseries object: 4-by-1
    2000Q1:  1
    2000Q2:  2
    2000Q3:  3
    2000Q4:  4
    ''
    user data: empty
    export files: [0]
>> redate(x,qq(1999,4),qq(2009,4))
ans =
    tseries object: 4-by-1
    2010Q1:  1
    2010Q2:  2
    2010Q3:  3
    2010Q4:  4
    ''
    user data: empty
    export files: [0]
\end{verbatim}


